package com.hainiu.cat.web.codeStudy.spring;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;

/**
 * create by biji.zhao on 2021/4/21
 */
public class MyBeanFactoryPostProcessor implements BeanFactoryPostProcessor {
    @Override
    public void postProcessBeanFactory(ConfigurableListableBeanFactory configurableListableBeanFactory) throws BeansException {
        BeanDefinition springBeanLife = configurableListableBeanFactory.getBeanDefinition("springBeanLife");
        springBeanLife.getPropertyValues().addPropertyValue("address", "贵州盘县");
    }
}
